/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package football;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author ACER
 */
@Embeddable
public class TicketPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_SITZPLATZ")
    private int idSitzplatz;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_MATCH")
    private int idMatch;

    public TicketPK() {
    }

    public TicketPK(int idSitzplatz, int idMatch) {
        this.idSitzplatz = idSitzplatz;
        this.idMatch = idMatch;
    }

    public int getIdSitzplatz() {
        return idSitzplatz;
    }

    public void setIdSitzplatz(int idSitzplatz) {
        this.idSitzplatz = idSitzplatz;
    }

    public int getIdMatch() {
        return idMatch;
    }

    public void setIdMatch(int idMatch) {
        this.idMatch = idMatch;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idSitzplatz;
        hash += (int) idMatch;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TicketPK)) {
            return false;
        }
        TicketPK other = (TicketPK) object;
        if (this.idSitzplatz != other.idSitzplatz) {
            return false;
        }
        if (this.idMatch != other.idMatch) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "football.TicketPK[ idSitzplatz=" + idSitzplatz + ", idMatch=" + idMatch + " ]";
    }
    
}
